<%
# expects to be given: form object (from form_for ... do |form| ... end) and
# attachment_name, for attachment tracking
-%>
<%= hidden_field attachment_name, :type, :value => 'IssueRef' %>
<dt>
  <%= link_to_function( image_tag( 'tango/22x22/emblems/emblem-unreadable.png',
                                   :alt => 'remove this attachment',
                                   :class => 'remove_img') ) do |page|
        page.remove attachment_name
      end %>
  <%= label attachment_name, :project, 'Project', :class => 'required' %>
</dt>
<dd>
  <%= text_field attachment_name, :project, :class => 'project' %>
  <div id="project_choices" class="autocomplete"></div>
  <%= auto_complete_field "#{attachment_name}_project",
        :url => autocomplete_project_url,
        :update => 'project_choices',
        :param_name => 'match' %>
  <%= label attachment_name, :local_id, 'Issue #', :class => 'required' %>
  <%= text_field attachment_name, :local_id, :class => 'num' %>
</dd>
